
<!DOCTYPE html >
<html>
<head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" >
    <title><?php wp_title ( '|', true,'right' ); ?></title>
     <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
	<!--<link rel="stylesheet" type="text/css" media="all" href="http://sorgalla.com/projects/jcarousel/skins/tango/skin.css" />-->
    <?php wp_head(); ?>
		<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.1.3.js"></script>
		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.coda-slider-2.0.js"></script>
		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.jcarousel.min.js"></script>
        
	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_directory'); ?>/jcarousel.css" />        
    
        <link type="text/css" href="<?php bloginfo('template_directory'); ?>/js/ui/css/ui-lightness/jquery-ui-1.8.17.custom.css" rel="stylesheet" />	
		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/ui/jquery-ui-1.8.17.custom.min.js"></script>
        
        
        
		<script type="text/javascript" language="javascript">
			jQuery().ready(function() {
				jQuery('#coda-slider-1').codaSlider();
				
				jQuery( "#slider-range" ).slider({
			range: true,
			min: 0,
			max: 500,
			values: [ 75, 300 ],
			slide: function( event, ui ) {
				jQuery("#investment-from").val("$" + ui.values[ 0 ]);
				jQuery("#investment-to").val("$" + ui.values[ 1 ]);
			}
		});
		/*jQuery( "#amount" ).val( "$" + jQuery( "#slider-range" ).slider( "values", 0 ) +
			" - $" + jQuery( "#slider-range" ).slider( "values", 1 ) );*/
			jQuery("#investment-from").val("$" + jQuery( "#slider-range" ).slider( "values", 0 ));
			jQuery("#investment-to").val("$" + jQuery( "#slider-range" ).slider( "values", 1 ));

			jQuery( "#slider-range" ).bind( "slidechange", function(event, ui) {
			  //alert(ui.values[1]);
			});
			//jQuery('#nav').load('load.php');	
			
			jQuery( "#format" ).buttonset();
			jQuery( "#radios" ).buttonset();
			
				
				
			});
			
			
			function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 1,
		scroll:1,
		wrap:"circular",
        initCallback: mycarousel_initCallback
    });
});

		</script>
</head>
<body>
<?php @include_once(TEMPL_TPL_ROOT_PATH.'header_tpl.php'); //header content area ?> 


<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/fonts/cufon-yui.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/fonts/Humanst521_BT_400.font.js"></script>



<style>
ul.carousel li{
	float:left;
	margin:0 10px 0 10px;
}
ul.carousel li img{
	height:110px;
}
</style>

<script type="text/javascript">

function updateSearch(id){
	<?php if(isset($_GET['filter'])): ?>
		goUpdateSearch();
	<?php else: ?>
		gotoSearch(id);
	<?php endif; ?>
}

function gotoSearch(id){
	filter=jQuery("#"+id).val();
	window.location='http://www.franquicia-t.com/search-test/?filter='+filter;
}

function goUpdateSearch(){
	t=jQuery("#tCategories").val();
	ids="";
	for(i=0;i<t;i++){
		if(jQuery("#c-"+i).attr("checked")==true) ids+=jQuery("#c-"+i).val()+",";
	}
	if(ids!="") ids=ids.substr(0,ids.length-1);
	jQuery("#filterCat").val(ids);
	doSubmit();			///////// this function defined on tpl_search.php
}

</script>

<?php
    $args=array("parent"		=> 82,
                "hide_empty"	=> 0);
    $filters = get_categories($args); 
?>

<div class="top-categories">
	<?php 
	$count=0;
	foreach($filters as $filter):
		if($_GET['filter']==$filter->term_id) $sel='checked="checked"'; else $sel='';
	 ?>
	 <input type="checkbox" id="c-<?php echo $count?>" value="<?php echo $filter->term_id; ?>" class="filter" onClick="updateSearch(this.id)" <?php echo $sel ?>  />
     <label for="c-<?php echo $count?>"><?php echo $filter->name; ?></label>
    <?php $count++; endforeach; ?>
    <input type="hidden" value="<?php echo $count?>" id="tCategories" />
</div>

<?php 
if(!is_home())
{
	if (function_exists('dynamic_sidebar') && dynamic_sidebar('Top Slider')){?><?php }
}
?>		
